babl: decrease tolerance
authorØyvind Kolås <pippin@gimp.org>
Tue, 27 Nov 2018 02:37:10 +0000 (03:37 +0100)
committerØyvind Kolås <pippin@gimp.org>
Tue, 27 Nov 2018 02:37:10 +0000 (03:37 +0100)
commit5e40364b3953f90051e290dd185b91e64aea1a66
tree82f6a509fcadefd54501cedd2c0ef5944edeb4fd
parentb52d05bc25d5bda38da544129ae21905bacb52aa
babl: decrease tolerance

The following conversion is undesirable, going via linear u16 on the
way to a different TRC u16 amount of quantization should be considered
bad enough to be avoided.

chosen RGBA u32 to R'G'B'A u16: steps: 4 error: 0.000005 cost: 876.000000
/usr/local/lib/babl-0.1/u32.so 0: RGBA u32 to RGBA u16
/usr/local/lib/babl-0.1/gggl-table-lies.so 0: RGBA u16 to RGBA float
/usr/local/lib/babl-0.1/sse2-float.so 0: RGBA float to R'G'B'A float
/usr/local/lib/babl-0.1/gggl.so 0: R'G'B'A float to R'G'B'A u16

This is slower but more correct:

chosen RGBA u32 to R'G'B'A u16: steps: 3 error: 0.000000 cost: 1051.000000
/usr/local/lib/babl-0.1/simple.so 0: RGBA u32 to RGBA float
/usr/local/lib/babl-0.1/sse2-float.so 0: RGBA float to R'G'B'A float
/usr/local/lib/babl-0.1/gggl.so 0: R'G'B'A float to R'G'B'A u16
babl/babl-fish-path.c